#include "key.h"

bool key_is_pressed(key_t* key)
{
    key->is_pressed = gpio_read_pin(key->gpio) == key->pressed_state;
    return key->is_pressed;
}
